Is that possible to convert an Exception object to SMTPException object?

Is that possible to convert an Exception object to SMTPException object?

am 01.01.2008 23:32:53 von Adrian

Hi All,

Is that possible to convert an Exception object to SMTPException object. I
tried CType() and it did not work!



Thanks,



Joe

Re: Is that possible to convert an Exception object to SMTPException object?

am 02.01.2008 02:38:32 von mark

"JoeP" wrote in message
news:u7LJUYMTIHA.3516@TK2MSFTNGP02.phx.gbl...
> Hi All,
>
> Is that possible to convert an Exception object to SMTPException object. I
> tried CType() and it did not work!


Just throw a new SMTPException...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

RE: Is that possible to convert an Exception object to SMTPException o

am 02.01.2008 03:16:00 von pbromberg

You cannot "upcast" a particular base class object to an instance of a more
specific object that derives from it. The base class ("Exception") has no
idea what the derived object may possibly be. Make sense?

-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com


"JoeP" wrote:

> Hi All,
>
> Is that possible to convert an Exception object to SMTPException object. I
> tried CType() and it did not work!
>
>
>
> Thanks,
>
>
>
> Joe
>
>
>

Re: Is that possible to convert an Exception object to SMTPException?

am 02.01.2008 04:17:05 von Adrian

This is a multi-part message in MIME format.

------=_NextPart_000_0011_01C84CC4.0AC17250
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable

Hi there,

Here is what I need to do. I have an Err handler routine that logs any =
error either from an=20
Exception or an SMTPException.=20



Within the Catch I call the Handler either for the SMTPException or the =
Exception. There 2 more properties=20

in the SMTPException that I need to log while they do no exists in the =
Exception.



In the err handler methods it starts like this:

Public Sub ErrorHandler(ByVal oErrObject As Object, ByVal cErrorType As =
String)
End Sub

So this way Either oibject could be picked up and I know which one is =
which based on the cErrorType,
But I am getting a little message saying as follows: =
System.InvalidCastException when I hover on top=20
of the oErrObject. It works fine otherwise.

The way I call the above is:

oInquiery.ErrorHandler(smtpEx, "SMTPErr")
Or
oInquiery.ErrorHandler(generalEx, "GeneralErr")

So any ideas?=20

Thanks,

Joe







=20



"Peter Bromberg [C# MVP]" wrote in =
message news:BA2B4544-203E-4934-8C6F-7078A09580FE@microsoft.com...
> You cannot "upcast" a particular base class object to an instance of a =
more=20
> specific object that derives from it. The base class ("Exception") has =
no=20
> idea what the derived object may possibly be. Make sense?
>=20
> -- Peter
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> MetaFinder: http://www.blogmetafinder.com=20
>=20
>=20
> "JoeP" wrote:
>=20
>> Hi All,
>>=20
>> Is that possible to convert an Exception object to SMTPException =
object. I=20
>> tried CType() and it did not work!
>>=20
>>=20
>>=20
>> Thanks,
>>=20
>>=20
>>=20
>> Joe
>>=20
>>=20
>>
------=_NextPart_000_0011_01C84CC4.0AC17250
Content-Type: text/html;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable

ï»=BF






Hi there,

 

Here is what I need to do. I have =
an Err=20
handler routine that logs any error either from an

size=3D2>Exception=20
or an SMTPException.


size=3D2> 


size=3D2>Within=20
the Catch I call the Handler either for =
the SMTPException or=20
the Exception. There 2 more properties


size=3D2>in the=20
SMTPException that I need to log while they do no exists in the=20
Exception.


size=3D2> 


size=3D2>In the err handler methods it starts like =
this:

face=3DArial size=3D2>

Public =
color=3D#0000ff size=3D2>Sub =
ErrorHandler(
color=3D#0000ff size=3D2>ByVal oErrObject =
color=3D#0000ff size=3D2>As color=3D#0000ff=20
size=3D2>Object
, size=3D2>ByVal cErrorType color=3D#0000ff=20
size=3D2>As
size=3D2>String)
size=3D2>End size=3D2>
size=3D2>Sub


So this way Either oibject could be =
picked up and I=20
know which one is which based on the cErrorType,
But I am getting a =
little=20
message saying as follows: System.InvalidCastException when I =
hover on=20
top 
of the oErrObject. It works fine otherwise.


The way I call the above is:


size=3D2>oInquiery.ErrorHandler(smtpEx,
size=3D2>"SMTPErr")
Or
size=3D2>oInquiery.ErrorHandler(generalEx,
size=3D2>"GeneralErr")


So any =
ideas?=20

size=3D2> size=3D2>
size=3D2>Thanks,


size=3D2>Joe


 

size=3D2>

 

 



 


size=3D2> 


"Peter Bromberg [C# MVP]" <
href=3D"mailto:pbromberg@yahoo.NoSpamMaam.com"> size=3D2>pbromberg@yahoo.NoSpamMaam.com
size=3D2>>=20
wrote in message
href=3D"news:BA2B4544-203E-4934-8C6F-7078A09580FE@microsoft. com"> face=3DArial=20
size=3D2>news:BA2B4544-203E-4934-8C6F-7078A09580FE@microsoft .com
A> face=3DArial size=3D2>...
> =
You cannot=20
"upcast" a particular base class object to an instance of a more =

>=20
specific object that derives from it. The base class ("Exception") has =
no=20

> idea what the derived object may possibly be. Make =
sense?
>=20

> -- Peter
> Site:
href=3D"http://www.eggheadcafe.com"> size=3D2>http://www.eggheadcafe.com
size=3D2>>=20
UnBlog:
face=3DArial=20
size=3D2>http://petesbloggerama.blogspot.com

face=3DArial=20
size=3D2>> MetaFinder:
href=3D"http://www.blogmetafinder.com"> face=3DArial size=3D2>http://www.blogmetafinder.com face=3DArial=20
size=3D2>
>
>
> "JoeP" wrote:
>
>> =
Hi=20
All,
>>
>> Is that possible to convert an Exception =
object to=20
SMTPException object. I
>> tried CType() and it did not=20
work!
>>
>>
>>
>> =
Thanks,
>>=20

>>
>>
>> Joe
>>
>>=20

>>


------=_NextPart_000_0011_01C84CC4.0AC17250--

Re: Is that possible to convert an Exception object to SMTPException?

am 02.01.2008 19:13:48 von Adrian

This is a multi-part message in MIME format.

------=_NextPart_000_0018_01C84D41.50750B40
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable

OK the fix for that was:

Public Sub ErrorHandler(ByVal oErrObject As System.Object, ByVal =
cErrorType As String)
End Sub

Hi there,
Here is what I need to do. I have an Err handler routine that logs any =
error either from an=20
Exception or an SMTPException.=20



Within the Catch I call the Handler either for the SMTPException or =
the Exception. There 2 more properties=20

in the SMTPException that I need to log while they do no exists in the =
Exception.



In the err handler methods it starts like this:

Public Sub ErrorHandler(ByVal oErrObject As Object, ByVal cErrorType =
As String)
End Sub

So this way Either oibject could be picked up and I know which one is =
which based on the cErrorType,
But I am getting a little message saying as follows: =
System.InvalidCastException when I hover on top=20
of the oErrObject. It works fine otherwise.

The way I call the above is:

oInquiery.ErrorHandler(smtpEx, "SMTPErr")
Or
oInquiery.ErrorHandler(generalEx, "GeneralErr")

So any ideas?=20

Thanks,

Joe







=20



"Peter Bromberg [C# MVP]" wrote in =
message news:BA2B4544-203E-4934-8C6F-7078A09580FE@microsoft.com...
> You cannot "upcast" a particular base class object to an instance of =
a more=20
> specific object that derives from it. The base class ("Exception") =
has no=20
> idea what the derived object may possibly be. Make sense?
>=20
> -- Peter
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> MetaFinder: http://www.blogmetafinder.com=20
>=20
>=20
> "JoeP" wrote:
>=20
>> Hi All,
>>=20
>> Is that possible to convert an Exception object to SMTPException =
object. I=20
>> tried CType() and it did not work!
>>=20
>>=20
>>=20
>> Thanks,
>>=20
>>=20
>>=20
>> Joe
>>=20
>>=20
>>
------=_NextPart_000_0018_01C84D41.50750B40
Content-Type: text/html;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable

ï»=BF






OK the fix for that was:

 

Public color=3D#0000ff=20
size=3D2>Sub
ErrorHandler( color=3D#0000ff=20
size=3D2>ByVal
oErrObject color=3D#0000ff=20
size=3D2>As
color=3D#ff0000>System. color=3D#0000ff=20
size=3D2>Object
, size=3D2>ByVal cErrorType color=3D#0000ff=20
size=3D2>As
size=3D2>String)
size=3D2>End size=3D2>
Sub

 

Hi there,

style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Here is what I need to do. I =
have an Err=20
handler routine that logs any error either from an


size=3D2>Exception or an SMTPException.


size=3D2> 


size=3D2>Within=20
the Catch I call the Handler either for=20
the SMTPException or the Exception. There 2 more =
properties=20


size=3D2>in the=20
SMTPException that I need to log while they do no exists in the=20
Exception.


size=3D2> 


size=3D2>In the err handler methods it starts like =
this:

face=3DArial size=3D2>

Public =
color=3D#0000ff size=3D2>Sub =
ErrorHandler(
color=3D#0000ff size=3D2>ByVal oErrObject =
color=3D#0000ff size=3D2>As color=3D#0000ff=20
size=3D2>Object
, size=3D2>ByVal cErrorType color=3D#0000ff=20
size=3D2>As
size=3D2>String)
size=3D2>End size=3D2>Sub


So this way Either oibject could be =
picked up and I=20
know which one is which based on the cErrorType,
But I am getting a =
little=20
message saying as follows: System.InvalidCastException when I =
hover=20
on top 
of the oErrObject. It works fine otherwise.


The way I call the above =
is:

size=3D2>oInquiery.ErrorHandler(smtpEx,
size=3D2>"SMTPErr")
Or
size=3D2>oInquiery.ErrorHandler(generalEx,
color=3D#800000=20
size=3D2>"GeneralErr"
)


So any =
ideas?=20

size=3D2> size=3D2>
size=3D2>Thanks,


size=3D2>Joe


 

size=3D2>

 

 



 


size=3D2> 


"Peter Bromberg [C# MVP]" =
<
href=3D"mailto:pbromberg@yahoo.NoSpamMaam.com"> size=3D2>pbromberg@yahoo.NoSpamMaam.com size=3D2>>=20
wrote in message
href=3D"news:BA2B4544-203E-4934-8C6F-7078A09580FE@microsoft. com">
face=3DArial=20
=
size=3D2>news:BA2B4544-203E-4934-8C6F-7078A09580FE@microsoft .com
A> face=3DArial size=3D2>...
> =
You cannot=20
"upcast" a particular base class object to an instance of a more =

>=20
specific object that derives from it. The base class ("Exception") has =
no=20

> idea what the derived object may possibly be. Make =
sense?
>=20

> -- Peter
> Site:
href=3D"http://www.eggheadcafe.com"> size=3D2>http://www.eggheadcafe.com
size=3D2>>=20
UnBlog:
face=3DArial=20
size=3D2>http://petesbloggerama.blogspot.com

face=3DArial=20
size=3D2>> MetaFinder:
href=3D"http://www.blogmetafinder.com"> face=3DArial size=3D2>http://www.blogmetafinder.com face=3DArial=20
size=3D2>
>
>
> "JoeP" wrote:
> =

>> Hi=20
All,
>>
>> Is that possible to convert an Exception =
object=20
to SMTPException object. I
>> tried CType() and it did not=20
work!
>>
>>
>>
>> =
Thanks,
>>=20

>>
>>
>> Joe
>>
>>=20

>>


------=_NextPart_000_0018_01C84D41.50750B40--

Re: Is that possible to convert an Exception object to SMTPException?

am 02.01.2008 19:19:30 von sloan

This is a multi-part message in MIME format.

------=_NextPart_000_00C4_01C84D42.1B3C5C20
Content-Type: text/plain;
charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

You might want to review this article about good practices:

http://blogs.msdn.com/kcwalina/archive/2005/03/16/396787.asp x



"JoeP" wrote in message =
news:O3FTI3OTIHA.3516@TK2MSFTNGP02.phx.gbl...
Hi there,

Here is what I need to do. I have an Err handler routine that logs any =
error either from an=20
Exception or an SMTPException.=20



Within the Catch I call the Handler either for the SMTPException or =
the Exception. There 2 more properties=20

in the SMTPException that I need to log while they do no exists in the =
Exception.



In the err handler methods it starts like this:

Public Sub ErrorHandler(ByVal oErrObject As Object, ByVal cErrorType =
As String)
End Sub

So this way Either oibject could be picked up and I know which one is =
which based on the cErrorType,
But I am getting a little message saying as follows: =
System.InvalidCastException when I hover on top=20
of the oErrObject. It works fine otherwise.

The way I call the above is:

oInquiery.ErrorHandler(smtpEx, "SMTPErr")
Or
oInquiery.ErrorHandler(generalEx, "GeneralErr")

So any ideas?=20

Thanks,

Joe







=20



"Peter Bromberg [C# MVP]" wrote in =
message news:BA2B4544-203E-4934-8C6F-7078A09580FE@microsoft.com...
> You cannot "upcast" a particular base class object to an instance of =
a more=20
> specific object that derives from it. The base class ("Exception") =
has no=20
> idea what the derived object may possibly be. Make sense?
>=20
> -- Peter
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> MetaFinder: http://www.blogmetafinder.com=20
>=20
>=20
> "JoeP" wrote:
>=20
>> Hi All,
>>=20
>> Is that possible to convert an Exception object to SMTPException =
object. I=20
>> tried CType() and it did not work!
>>=20
>>=20
>>=20
>> Thanks,
>>=20
>>=20
>>=20
>> Joe
>>=20
>>=20
>>
------=_NextPart_000_00C4_01C84D42.1B3C5C20
Content-Type: text/html;
charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

ï»=BF






You might want to review this article =
about good=20
practices:

 

href=3D"http://blogs.msdn.com/kcwalina/archive/2005/03/16/39 6787.aspx">ht=
tp://blogs.msdn.com/kcwalina/archive/2005/03/16/396787.aspx
IV>
 

 

 

style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"JoeP" < href=3D"mailto:NoSpam@Hotmail.com">NoSpam@Hotmail.com>=20
wrote in message =
href=3D"news:O3FTI3OTIHA.3516@TK2MSFTNGP02.phx.gbl">news:O3F TI3OTIHA.3516=
@TK2MSFTNGP02.phx.gbl...

Hi there,

 

Here is what I need to do. I =
have an Err=20
handler routine that logs any error either from an

size=3D2>Exception or an SMTPException.


size=3D2> 


size=3D2>Within=20
the Catch I call the Handler either for=20
the SMTPException or the Exception. There 2 more =
properties=20


size=3D2>in the=20
SMTPException that I need to log while they do no exists in the=20
Exception.


size=3D2> 


size=3D2>In the err handler methods it starts like =
this:

face=3DArial size=3D2>

Public =
color=3D#0000ff size=3D2>Sub =
ErrorHandler(
color=3D#0000ff size=3D2>ByVal oErrObject =
color=3D#0000ff size=3D2>As color=3D#0000ff=20
size=3D2>Object
, size=3D2>ByVal cErrorType color=3D#0000ff=20
size=3D2>As
size=3D2>String)
size=3D2>End size=3D2>Sub


So this way Either oibject could be =
picked up and I=20
know which one is which based on the cErrorType,
But I am getting a =
little=20
message saying as follows: System.InvalidCastException when I =
hover=20
on top 
of the oErrObject. It works fine otherwise.


The way I call the above =
is:

size=3D2>oInquiery.ErrorHandler(smtpEx,
size=3D2>"SMTPErr")
Or
size=3D2>oInquiery.ErrorHandler(generalEx,
color=3D#800000=20
size=3D2>"GeneralErr"
)


So any =
ideas?=20

size=3D2> size=3D2>
size=3D2>Thanks,


size=3D2>Joe


 

size=3D2>

 

 



 


size=3D2> 


"Peter Bromberg [C# MVP]" =
<
href=3D"mailto:pbromberg@yahoo.NoSpamMaam.com"> size=3D2>pbromberg@yahoo.NoSpamMaam.com size=3D2>>=20
wrote in message
href=3D"news:BA2B4544-203E-4934-8C6F-7078A09580FE@microsoft. com">
face=3DArial=20
=
size=3D2>news:BA2B4544-203E-4934-8C6F-7078A09580FE@microsoft .com
A> face=3DArial size=3D2>...
> =
You cannot=20
"upcast" a particular base class object to an instance of a more =

>=20
specific object that derives from it. The base class ("Exception") has =
no=20

> idea what the derived object may possibly be. Make =
sense?
>=20

> -- Peter
> Site:
href=3D"http://www.eggheadcafe.com"> size=3D2>http://www.eggheadcafe.com
size=3D2>>=20
UnBlog:
face=3DArial=20
size=3D2>http://petesbloggerama.blogspot.com

face=3DArial=20
size=3D2>> MetaFinder:
href=3D"http://www.blogmetafinder.com"> face=3DArial size=3D2>http://www.blogmetafinder.com face=3DArial=20
size=3D2>
>
>
> "JoeP" wrote:
> =

>> Hi=20
All,
>>
>> Is that possible to convert an Exception =
object=20
to SMTPException object. I
>> tried CType() and it did not=20
work!
>>
>>
>>
>> =
Thanks,
>>=20

>>
>>
>> Joe
>>
>>=20

>>


------=_NextPart_000_00C4_01C84D42.1B3C5C20--

Re: Is that possible to convert an Exception object to SMTPException?

am 02.01.2008 21:51:16 von Adrian

This is a multi-part message in MIME format.

------=_NextPart_000_0012_01C84D57.4F7E9B50
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable

Thanks for that tip.=20

"sloan" wrote in message =
news:eLlyfvWTIHA.4684@TK2MSFTNGP06.phx.gbl...
You might want to review this article about good practices:

http://blogs.msdn.com/kcwalina/archive/2005/03/16/396787.asp x



"JoeP" wrote in message =
news:O3FTI3OTIHA.3516@TK2MSFTNGP02.phx.gbl...
Hi there,

Here is what I need to do. I have an Err handler routine that logs =
any error either from an=20
Exception or an SMTPException.=20



Within the Catch I call the Handler either for the SMTPException or =
the Exception. There 2 more properties=20

in the SMTPException that I need to log while they do no exists in =
the Exception.



In the err handler methods it starts like this:

Public Sub ErrorHandler(ByVal oErrObject As Object, ByVal cErrorType =
As String)
End Sub

So this way Either oibject could be picked up and I know which one =
is which based on the cErrorType,
But I am getting a little message saying as follows: =
System.InvalidCastException when I hover on top=20
of the oErrObject. It works fine otherwise.

The way I call the above is:

oInquiery.ErrorHandler(smtpEx, "SMTPErr")
Or
oInquiery.ErrorHandler(generalEx, "GeneralErr")

So any ideas?=20

Thanks,

Joe







=20



"Peter Bromberg [C# MVP]" wrote in =
message news:BA2B4544-203E-4934-8C6F-7078A09580FE@microsoft.com...
> You cannot "upcast" a particular base class object to an instance =
of a more=20
> specific object that derives from it. The base class ("Exception") =
has no=20
> idea what the derived object may possibly be. Make sense?
>=20
> -- Peter
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> MetaFinder: http://www.blogmetafinder.com=20
>=20
>=20
> "JoeP" wrote:
>=20
>> Hi All,
>>=20
>> Is that possible to convert an Exception object to SMTPException =
object. I=20
>> tried CType() and it did not work!
>>=20
>>=20
>>=20
>> Thanks,
>>=20
>>=20
>>=20
>> Joe
>>=20
>>=20
>>
------=_NextPart_000_0012_01C84D57.4F7E9B50
Content-Type: text/html;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable

ï»=BF






Thanks for that tip. 

 

"sloan" < href=3D"mailto:sloan@ipass.net">sloan@ipass.net> wrote=20
in message href=3D"news:eLlyfvWTIHA.4684@TK2MSFTNGP06.phx.gbl">news:eLl yfvWTIHA.4684=
@TK2MSFTNGP06.phx.gbl...

style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
You might want to review this article =
about good=20
practices:

 

=
href=3D"http://blogs.msdn.com/kcwalina/archive/2005/03/16/39 6787.aspx">ht=
tp://blogs.msdn.com/kcwalina/archive/2005/03/16/396787.aspx
IV>
 

 

 

style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"JoeP" < href=3D"mailto:NoSpam@Hotmail.com">NoSpam@Hotmail.com> wrote =
in message=20
=
href=3D"news:O3FTI3OTIHA.3516@TK2MSFTNGP02.phx.gbl">news:O3F TI3OTIHA.3516=
@TK2MSFTNGP02.phx.gbl...

Hi there,

 

Here is what I need to do. I =
have an Err=20
handler routine that logs any error either from an

face=3DArial=20
size=3D2>Exception or an SMTPException.


face=3DArial=20
size=3D2>
 


face=3DArial=20
size=3D2>Within the Catch I call the Handler either for=20
the SMTPException or the Exception. There 2 more =
properties=20


face=3DArial size=3D2>in=20
the SMTPException that I need to log while they do no exists in the=20
Exception.


face=3DArial=20
size=3D2>
 


face=3DArial=20
size=3D2>In the err handler methods it starts like =
this:

face=3DArial size=3D2>

Public size=3D2> color=3D#0000ff size=3D2>Sub =
ErrorHandler(
color=3D#0000ff size=3D2>ByVal oErrObject =
color=3D#0000ff size=3D2>As color=3D#0000ff=20
size=3D2>Object
, size=3D2>ByVal cErrorType color=3D#0000ff=20
size=3D2>As
size=3D2>String)
size=3D2>End size=3D2>Sub


So this way Either oibject could be =
picked up and=20
I know which one is which based on the cErrorType,
But I am =
getting a=20
little message saying as follows: =
System.InvalidCastException when=20
I hover on top 
of the oErrObject. It works fine=20
otherwise.


The way I call the above =
is:

size=3D2>oInquiery.ErrorHandler(smtpEx,

size=3D2>"SMTPErr"
)
Or
size=3D2>oInquiery.ErrorHandler(generalEx,
color=3D#800000=20
size=3D2>"GeneralErr"
size=3D2>)


So any =
ideas?=20

size=3D2> size=3D2>
size=3D2>Thanks,


size=3D2>Joe


 

size=3D2>

 

 



 


face=3DArial=20
size=3D2>
 


"Peter Bromberg [C# MVP]" =
<
href=3D"mailto:pbromberg@yahoo.NoSpamMaam.com"> size=3D2>pbromberg@yahoo.NoSpamMaam.com size=3D2>>=20
wrote in message
=
href=3D"news:BA2B4544-203E-4934-8C6F-7078A09580FE@microsoft. com"> face=3DArial=20
=
size=3D2>news:BA2B4544-203E-4934-8C6F-7078A09580FE@microsoft .com A> face=3DArial size=3D2>...
size=3D2>> You cannot=20
"upcast" a particular base class object to an instance of a more =

>=20
specific object that derives from it. The base class ("Exception") =
has no=20

> idea what the derived object may possibly be. Make =
sense?
>=20

> -- Peter
> Site:
href=3D"http://www.eggheadcafe.com"> size=3D2>http://www.eggheadcafe.com
size=3D2>>=20
UnBlog:

face=3DArial =
size=3D2>http://petesbloggerama.blogspot.com

face=3DArial size=3D2>> MetaFinder: href=3D"http://www.blogmetafinder.com"> size=3D2>http://www.blogmetafinder.com size=3D2>=20

>
>
> "JoeP" wrote:
>
>> Hi=20
All,
>>
>> Is that possible to convert an =
Exception=20
object to SMTPException object. I
>> tried CType() and it =
did not=20
work!
>>
>>
>>
>> =
Thanks,
>>=20

>>
>>
>> Joe
>>
>>=20

>>


------=_NextPart_000_0012_01C84D57.4F7E9B50--